/**
 * @author xinjie.txt
 * @time: 2020年7月8日 下午1:06:38
 */
package com.jiepu.exercise.primary.chapter5.exercise1;

/**
 * @Description: exercise1
 * @author xinjie.txt
 */
public class Teacher {
	private String name; // 姓名
	private int age; // 年龄
	private double salary; // 薪水

	// 用于年龄增加的方法
	public void increaseAge() {
		age++;
	}

	public Teacher(String name, int age, double salary) {
		this.name = name;
		this.age = age;
		this.salary = salary;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public double getSalary() {
		return salary;
	}

	public void setSalary(double salary) {
		this.salary = salary;
	}

	public String toString() {
		return "name:" + name + "\tage:" + age + "\tsalary:" + salary;
	}

}
